﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public static class ObjectExtensions
    {
        public static TDest SafeGet<TSource, TDest>(this TSource target, Func<TSource, TDest> evaluation) where TSource : class
        {
            if (target == null)
                return default(TDest);
            return evaluation(target);
        }
    }
}
